package com.itcast.peft.util;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import org.springframework.stereotype.Component;

import lombok.Getter;
import lombok.experimental.Delegate;

@Component
public class AsyncWrapper {

    /**
     * 数据量较大，起并发
     */
    @Delegate
    @Getter
    private ThreadPoolExecutor executor = new ThreadPoolExecutor(16, 16,
            60L, TimeUnit.SECONDS,
            new ArrayBlockingQueue<Runnable>(8192));
}
